package com.jtlrm.ckd.mvp.view.adapter;

import android.view.View;

import com.base.sdk.util.DateFormatUtil;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jtlrm.ckd.R;
import com.jtlrm.ckd.entity.ShengHuaCheckEntity;

public class ShengHuaCheckAdapter extends BaseQuickAdapter<ShengHuaCheckEntity, BaseViewHolder> {

    public ShengHuaCheckAdapter() {
        super(R.layout.shenghua_check_item);
    }


    @Override
    protected void convert(BaseViewHolder helper, ShengHuaCheckEntity item) {
        if (item.isFirst()) {
            helper.getView(R.id.yuefen).setVisibility(View.VISIBLE);
            helper.setText(R.id.yuefen, item.getYueFen());
        } else {
            helper.getView(R.id.yuefen).setVisibility(View.GONE);
        }
        helper.setText(R.id.date, item.getMeasureDate());

    }

}

